using ShuiLing.Application;
using ShuiLing.Infrastructure;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder
    .Services
    .AddControllers()
    .AddApplicationPart(ShuiLing.Presentation.AssemblyReference.Assembly);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddApplicationInject();
builder.Services.AddInfrastructure();
WebApplication app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.UseAuthorization();
app.MapControllers();
app.Run();
